package com.codebattery.client;

import com.codebattery.config.LogConfiguration;
import com.codebattery.domain.model.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(name = "mall-service", configuration = LogConfiguration.class)
public interface MallFeignClient {

    @RequestMapping(value="/cart/get-cart",method = RequestMethod.POST)
    CartInfo getCart(@RequestBody Map<String, String> param);

    @RequestMapping(value="/cart/empty-cart",method = RequestMethod.POST)
    void emptyCart(@RequestParam String userId);

}